/*******************************************************************************
 * Copyright (c) 2003 Boris Pruessmann and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Common Public License v0.5
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors:
 *    Boris Pruessmann - Initial implementation.
 ******************************************************************************/
package net.sourceforge.perforce.core;

import net.sourceforge.perforce.api.IError;
import net.sourceforge.perforce.api.IPerforceCommand;

/**
  * @version $Revision: 246 $
  * @author  <a href="mailto:bpruessmann@users.sourceforge.net">Boris Pruessmann</a>
  */
public interface IClientUserListener 
{
	/** Called upon starting a specific action.
	  * 
	  * @param command the command.
	  * @param arguments array of arguments.
	  */
	void run(IPerforceCommand command, String[] arguments);
	 
	/** Process error data as result of a failed operation.
	  * 
	  * @param error the Error instance containing details.
	  */
	void handleError(IPerforceCommand command, IError error);	 
	 
	/** Output error data as a result of a failed operation.
	  * 
	  * @param errorString the error as String.
	  */
	void outputError(IPerforceCommand command, String errorString);

	/** Output tabular data as a result of most commands that report
	  * metadata.
	  * 
	  * @param level the level of information; 0 being the default.
	  * @param infoString the information string.
	  */
	void outputInfo(IPerforceCommand command, char level, String infoString);
	
	/** Called upon finishing the command. */
	void finished(IPerforceCommand command);
}
